import { useRouteError } from "react-router-dom"
import NotFound from "./404"
export default function ErrorPage() {
  const error = useRouteError() as RouterError
  if (error.status === 404) {
    return <NotFound />
  }
  return <h1>Error</h1>
}
